home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: allocating unlimited string input....HELP
- Date: Wed, 10 Jan 96 14:45:23 GMT
- Organization: none
- Message-ID: <821285123snz@genesis.demon.co.uk>
- References: <4cvph6$s8s@pulp.ucs.ualberta.ca>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4cvph6$s8s@pulp.ucs.ualberta.ca>
- ryangall@gpu.srv.ualberta.ca "Bobby Sixkiller" writes:
-
- >I am doing an assignment for my computing class, and seem to have run into
- >a small problem. I am supposed to be able to read an unlimited string from
- >stdin, without defining maximum size. I thought that this problem would be
- >simple....but I have been at it for a while now. Ill show you what my last
- >resort was.....
-
- Check up on the realloc() standard library function. It allows you to change
- the size of a malloc'd object while preserving the data in it (as far as
- possible if you make it smaller).
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-